package com.ashbur.LinearSearch;

/**
 * @author : Eumenides
 * @Description :
 * @date : 2022/7/17
 * @Copyright ： 公众号：菜鸟的大厂梦
 */
public class Student {

    private String name;

    public Student(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if(this == o) {
            return true;
        }

        if(o == null) {
            return false;
        }

        if(this.getClass() != o.getClass()) {
            return false;
        }

        Student another = (Student)o;
        return this.name.equals(another.name);
    }

    @Override
    public int hashCode() {
        return name != null ? name.hashCode() : 0;
    }
}
